package gui.Error;

public class StringName {

	public static final String getValueOf(String name)  throws StringNameException{
		for(int i=0;i<name.length();i++){
			if((name.charAt(i)>='A')&&(name.charAt(i)<='Z'))
				continue;
			if((name.charAt(i)>='a')&&(name.charAt(i)<='z'))
				continue;
			if((name.charAt(i)>='1')&&(name.charAt(i)<='9'))
				continue;
			if(name.charAt(i)=='-')
				continue;
			if(name.charAt(i)==' ')
				continue;
			if(name.charAt(i)=='\'')
				continue;
			throw new StringNameException(name.charAt(i));
		}
		return name;
	}
	
}
